package com.hooya.fa.eu.biz.scheduler;

import com.hooya.fa.eu.biz.service.PLInvoiceService;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @Description 波兰开票定时任务
 * @Author : Zongz
 * @Copyright Copyright (c) 豪雅集团
 * @Create 2024/11
 * @Version 1.0.0
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class PlInvoicingHandler {

    private final PLInvoiceService plInvoiceService;

    /**
     * 欧盟审计数据生成
     */
    @XxlJob("plInvoicingHandler")
    public void plInvoicingHandler() {
        log.info(LocalDateTime.now() + "：开始进行波兰开票");
        plInvoiceService.addPLInvoice();
        XxlJobHelper.handleSuccess("PL invoicing success");
    }
}
